<?php
namespace app\common\model;

class DictTypeModel extends BaseModel
{
    protected $name = 'dict_type'; //定义用户表
    //开启自动写入时间戳
    protected $autoWriteTimestamp = false;
    // 定义自动完成的属性
    protected $auto = []; //新增修改
    protected $insert = []; //插入
    protected $update = []; //修改

    /*读取器*/
    public function getIsFixedTextAttr($value, $data)
    {
        $status = [
            0 => '<span class="label label-success">允许</span>',
            1 => '<span class="label label-warning">不允许</span>',
        ];
        return $status[$data['is_fixed']];
    }

    /*修改器*/

}




